package com.xinsilu.hospital.controller;

import com.xinsilu.common.Result;
import com.xinsilu.hospital.entity.Department;
import com.xinsilu.hospital.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ym
 * @since 2021-09-22
 */
@RestController
@RequestMapping("/api/hospital/Department")
public class DepartmentController {
    @Autowired
    private IDepartmentService iDepartmentService;


    /**
     * 返回所有数据
     * @return
     */
    @RequestMapping("/getList")
    public Object getList() {
        List<Department> list = iDepartmentService.list(null);
        return Result.ok(list);
    }



}
